<?php 
/*
Template Name: Map
*/
get_header();
$this_is_page=true;
?>

<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/map/FusionMaps.js"></script>

 <div class="container1">
	 	   <div class="AboutSubmenu">
		   	<ul>
				
				<li class="Home"><a href="<?php bloginfo('url'); ?>"><img src="<?php bloginfo('template_url'); ?>/images/homebutton.png" /></a></li>
				
                             <?php   
                            if($post->post_parent) {
                              $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0");
                              $titlenamer = get_the_title($post->post_parent);
                              }
                              else {
                              $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
                              $titlenamer = get_the_title($post->ID);
                              }
                                           ?>
                                <li class="TitleButton"><?php echo $titlenamer; ?></li>
                              <?php
                              if ($children) { ?>
                              <?php echo $children; ?>
                             <?php } ?>
				<li class="Image"><img src="<?php bloginfo('template_url'); ?>/images/branch.png" /></li>
			</ul>
			
			
		   </div>
		   
		   <div class="contentSub">
		   	     <div class="titlePic">
			 	<img src="<?php bloginfo('template_url'); ?>/images/officeLocation.png" /></div>
			  <div class="contentBody"> 
			  	<div class="contentArticle">
                              <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
					<div class="Title">
                                            <h4><?php the_title(); ?></h4>
					</div>
	
				<div id="mapdiv">
                                  FusionMaps
                            </div>
                            <script language="JavaScript">					
                                    var map = new FusionMaps("<?php bloginfo('template_url'); ?>/map/FCMap_China2.swf", "map1Id", "620", "450", "0", "0");
                                    map.setDataURL("<?php bloginfo('template_url'); ?>/map/locations.xml");
                                    map.render("mapdiv");
                            </script>
		
					  <div>
					  	 <?php the_content(); ?>
					  </div>
					<?php endwhile; else: ?>
					<div class="Title">
					<h4>链接错误</h4>
					</div>

					  <div>
					  	对不起没有你要的内容
					  </div>
				<?php endif; ?>

			 </div>
		   </div>
		    <div class="pageBottomPic"></div>
		   </div>
		 </div>


	
<?php get_footer(); ?>
